<template>
  <div class="home">
    <button @click="open">消息弹框</button>
    <button @click="open1">成功</button>
    <button @click="open2">警告</button>
    <button @click="open3">错误</button>
  </div>
</template>

<script>

export default {
  name: 'Home',
  methods: {
    open(){
      this.$message('消息弹框');
    },
    open1(){
      this.$message({
        text:'成功',
        type:'success'
      })
    },
    open2(){
      this.$message({
        text:'警告',
        type:'warning'
      })
    },
    open3(){
      this.$message({
        text:'错误',
        type:'error'
      })
      //this.$message.error('错误')
    }
  },
}
</script>
